package com.cqie.teacherserver.controller;


import com.cqie.campuscommon.result.Result;
import com.cqie.teacherserver.service.ITeacherReportIndexService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 老师报告指标 前端控制器
 * </p>
 *
 * @author zhangr132
 * @since 2024-05-31
 */
@Slf4j
@Api(tags = "教师报告指标管理")
@RestController
public class TeacherReportIndexController {
    @Autowired
    private ITeacherReportIndexService teacherReportIndexService;

    @ApiOperation("教师基本信息获取")
    @RequestMapping("getTeacherInfo")
    public Result getTeacherInfo(String teacherCode){
        log.info("----------正在获取教师基本信息----------");
        Result result = teacherReportIndexService.getTeacherInfo(teacherCode);
        log.info("----------处理获取教师基本信息请求结束----------");
        return result;
    }

    @ApiOperation("教师入职时间获取")
    @RequestMapping("/getTeacherEntryTime")
    public Result getTeacherEntryTime(String teacherCode){
        log.info("----------正在获取教师入职时间----------");
        Result result = teacherReportIndexService.getTeacherEntryTime(teacherCode);
        log.info("----------处理获取教师入职时间请求结束----------");
        return result;
    }

    @ApiOperation("教师档案信息获取")
    @RequestMapping("/getTeacherDepartment")
    public Result getTeacherDepartment(String teacherCode) {
        log.info("----------正在获取教师所在学院-系部----------");
        Result result = teacherReportIndexService.getTeacherDepartment(teacherCode);
        log.info("----------处理获取教师所在学院-系部请求结束----------");
        return result;
    }

    @ApiOperation("教师授课信息获取")
    @RequestMapping("/getTeacherCourse")
    public Result getTeacherCourse(String teacherCode) {
        log.info("----------正在获取教师授课信息----------");
        Result result = teacherReportIndexService.getTeacherCourse(teacherCode);
        log.info("----------处理获取教师授课信息请求结束----------");
        return result;
    }

    @ApiOperation("新增教师基本信息")
    @RequestMapping("/addTeacherBaseInfo")
    public Result addTeacherBaseInfo(String teacherCode){
        log.info("----------正在新增教师基本信息----------");
        Result result = teacherReportIndexService.addTeacherBaseInfo(teacherCode);
        log.info("----------处理新增教师基本信息请求结束----------");
        return result;
    }




}
